package com.hcc.gateway.test.dubbo.impl;


import com.hcc.gateway.test.domain.DubboTestVo;
import com.hcc.gateway.test.dubbo.DubboTest;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * DubboTest
 *
 * @author shengjun.hu
 * @date 2022/2/7
 */
@Service
@DubboService(timeout = 5000, interfaceClass = DubboTest.class)
public class DubboTestImpl implements DubboTest {

    @Override
    public void dubboTest1() {
        System.out.println("hello");
    }

    @Override
    public String dubboTest2() {
        return "hello";
    }

    @Override
    public String dubboTest3(String name) {
        return "hello" + " " + name;
    }

    @Override
    public String dubboTest4(String name, Integer age, Boolean sex) {
        return name + " " + age + " " + sex;
    }

    @Override
    public String dubboTest5(Long id, Byte i, char a) {
        return id + " " + i + " " + a;
    }

    @Override
    public Map<String, String> dubboTest6(Map<String, String> map) {
        return map;
    }

    @Override
    public DubboTestVo dubboTest7(DubboTestVo dubboTestVo) {
        return dubboTestVo;
    }

    @Override
    public List<DubboTestVo> dubboTest8(DubboTestVo dubboTestVo) {
        return Arrays.asList(dubboTestVo);
    }

    @Override
    public List<DubboTestVo> dubboTest9(List<DubboTestVo> dubboTestVos) {
        return dubboTestVos;
    }

    @Override
    public List<String> dubboTest10(List<String> arrs) {
        return arrs;
    }

}
